﻿using System;
using Gp.Scripts.Core;
using MoreMountains.Tools;
using UnityEngine;
using UnityEngine.UI;

namespace Gp.Scripts.Core.Controller {
    public class VolumeUIController : MonoBehaviour {
        [SerializeField] private Slider master;
        [SerializeField] private Slider music;
        [SerializeField] private Slider effect;
        [SerializeField] private Slider ui;


        private void OnEnable() {
            var system = Global.Get<MusicManageSystem>();
            // master.value = system.GetVolume(MMSoundManager.MMSoundManagerTracks.Master);
            // music.value = system.GetVolume(MMSoundManager.MMSoundManagerTracks.Music);
            // effect.value = system.GetVolume(MMSoundManager.MMSoundManagerTracks.Sfx);
            // ui.value = system.GetVolume(MMSoundManager.MMSoundManagerTracks.UI);
        }


        private void Update() {
            // var system = Global.Get<MusicManageSystem>();
            // system.SetVolume(MMSoundManager.MMSoundManagerTracks.Master, master.value);
            // system.SetVolume(MMSoundManager.MMSoundManagerTracks.Music, music.value);
            // system.SetVolume(MMSoundManager.MMSoundManagerTracks.Sfx, effect.value);
            // system.SetVolume(MMSoundManager.MMSoundManagerTracks.UI, ui.value);
        }
    }
}